<template>
    <el-input 
        v-model.trim="model" 
        :clearable="option.clearable || true" 
        :maxlength="option.maxlength || '30'" 
        :placeholder="option.placeholder || '请输入'"
        :style="{ width: option.width || '350px'}"
        :type="option.type || 'text'"
        />
</template>
<script>
export default {
    name: 'iv-num-input',
    props: {
        value: {
            type: String,
            default: ''
        },
        option: {
            type: Object,
            default: () => {}
        }
    },
    computed: {
        model: {
            get(){
                return this.value
            },
            set(val){
                this.$emit("update:value", val)
            }
        }
    }
}
</script>
